<!-- 基本信息 -->

<template>
  <EasyScroll full>
    <div class="QuestionnaireList-MyModal-middle">
      <EasyRow col2>
        <FormPhoto label="封面图片" bind="cover" folder="questionnaire" />
      </EasyRow>

      <FormInput label="问卷标题" bind="title" required />

      <FormSlot isTip>
        <BtnPrimary
          v-for="item in DICT.TITLE_BTN"
          :key="item[0]"
          :title="item[1]"
          :disabled="one.title.includes(item[1])"
          plain
          @click="one.title += item[1]"
        />
        <span class="floatRight">如“某年”会替换为“2000年” , “hh:mm”会替换为“12:30”</span>
      </FormSlot>

      <EasyRow col4>
        <FormRadio
          label="填写有效时间"
          bind="isForever"
          :dict="DICT.VALID_TIME"
          initFirst
          isBtn
          auto
          @change="one.validityHour = undefined"
        />
        <FormNum v-if="one.isForever === 2" bind="validityHour" :min="1" :init="24" :step="24" noLabel suffix="小时" />
      </EasyRow>

      <FormRichText label="欢迎语" bind="welcome" folder="questionnaire" />

      <FormRichText label="答谢语" bind="thanks" folder="questionnaire" />

      <div v-show="false">
        <FormRadio label="主题风格" bind="theme" :dict="DICT.THEME" initFirst />

        <EasyRow col4>
          <FormSwitch label="是否匿名" bind="anonymous" initFalse />
          <FormSlot isTip noLabel quar3>实名时仅登录用户可填，匿名时任何人均可填写</FormSlot>
        </EasyRow>

        <EasyRow col4>
          <FormSwitch label="允许修改" bind="edit" initFalse />
          <FormSlot isTip noLabel quar3>已填表单是否允许多次修改</FormSlot>
        </EasyRow>

        <EasyRow col4>
          <FormNum label="固定分页" bind="pageSize" :min="0" :max="50" initMin />
          <FormSlot isTip noLabel quar3>为 0 无固定分页，在问题之间也自行添加分页符</FormSlot>
        </EasyRow>

        <EasyRow col4>
          <FormDate label="截止日期" bind="endDate" future lastSecond center />
          <FormSlot isTip noLabel quar3>在截止日期之前，也可手动终止问卷</FormSlot>
        </EasyRow>
      </div>
    </div>
  </EasyScroll>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'

// ============================== 导出组件 ============================== //

export default {
  /**
   * 名称定义 (实际使用名称)
   */
  name: 'MyBase',

  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [CORE.mixWeb()],
}
</script>
